package com.mapbased.cc.valid;

import com.mapbased.wfw.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: mapbased.com</p>
 *
 * @author chy_hs(Baily)
 * @version 1.0
 */
public class Name
    implements Validator
{
    /**
     *
     * @param value String
     * @param rc RenderContext
     * @return boolean
     * @todo Implement this com.mapbased.cc.valid.Validator method
     */
    public boolean isValid(String v,RenderContext rc)
    {

        if(v.indexOf('&') >= 0
           || v.indexOf('<') >= 0
           || v.indexOf('>') >= 0
           || v.indexOf('"') >= 0
           || v.indexOf('\'') >= 0
            )
        {
            return false;
        }

        return true;
    }

    public String toString()
    {
        return "格式不正确!";
    }

}
